//
//  UIViewController+Lc.h
//  18Birdies
//
//  Created by Lc on 15/11/18.
//  Copyright © 2015年 Lc. All rights reserved.
//

#import <UIKit/UIKit.h>

#define SYSTEM_TRANSITION_DURATION 0.25

@interface UIViewController (Lc)

@property(nonatomic, strong, readonly) UIViewController* currentViewController;
@property(nonatomic, assign, readonly) BOOL isCurrentViewController;
@property(nonatomic, assign, readonly) BOOL isInCurrentViewController;
@property(nonatomic, assign, readonly) BOOL isNavigaionController;
@property(nonatomic, assign, readonly) BOOL isTabBarController;
@property(nonatomic, assign, readonly) CGFloat width;
@property(nonatomic, assign, readonly) CGFloat height;

+ (UIViewController*)currentViewController;
+ (UIViewController*)currentViewControllerInWindow:(UIWindow*)window;

- (void)presentViewController:(UIViewController*)viewControllerToPresent
             usePushAnimation:(BOOL)usePushAnimation
                   completion:(void (^)(void))completion;
- (void)presentViewController:(UIViewController*)viewControllerToPresent
            useAlphaAnimation:(BOOL)useAlphaAnimation
                   completion:(void (^)(void))completion;
- (void)presentTransparentViewController:(UIViewController*)viewControllerToPresent
                                animated:(BOOL)animated
                              completion:(void (^)(void))completion;

- (void)dismissViewControllerWithPopAnimation:(BOOL)flag completion:(void (^)(void))completion;

- (void)showFillSizeController:(UIViewController*)controller;
- (void)showFillSizeController:(UIViewController*)controller inView:(UIView*)containerView;

- (void)showController:(UIViewController*)controller;
- (void)showController:(UIViewController*)controller inView:(UIView*)containerView;
- (void)showController:(UIViewController*)controller inView:(UIView*)containerView updateViewBlock:(void (^)(void))updateViewBlock;
- (void)hideController:(UIViewController*)controller;
- (BOOL)containsController:(UIViewController*)controller;

- (NSString*)hierarchyContext;

@end
